package com.lightning.examples.web.test.controller;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

@Controller
@RequestMapping("/hill")
public class HillController {

	@RequestMapping(value = "show", method = RequestMethod.GET)
	public String show() {
		System.out.println("show");
		return "test/layout";
	}

	@RequestMapping(value="view", method = RequestMethod.GET)
	public String view() {
		System.out.println("view");
		return "test/layout";
	}

	@RequestMapping(value = "/rest/{id}", method = RequestMethod.GET)
	public String rest(@PathVariable("id") Long id) {
		System.out.println(id);
		return "test/layout";
	}
	
	@RequestMapping("/*")
	public String index(HttpServletRequest request, HttpServletResponse response) {
		System.out.println("index");
		return "test/layout";
	}
}
